package com.igeek.javase.ch03.extendss;

import com.sun.corba.se.spi.orbutil.threadpool.Work;

/**
 * @author chenmin
 * 2023/7/12 16:39
 * @description TODO
 *
 * 作业：Worker extends Person  个性：work()
 */
public class Test {

    public static void main(String[] args) {
//        //人  父类
//        Person person = new Person("人" , 18 , '男');
//        person.eat();
//        person.sleep();
//        //子类特有的属性和方法，父类无法使用
//        //person.study();
//        //person.teach();
//
//        //学生
//        Student stu = new Student("李四" , 20 , '男' , 3);
//        stu.eat();
//        stu.sleep();
//        stu.study();
//
//        //教师
//        Teacher teacher = new Teacher("老王" , 50 , '男' , "高级工程师");
//        teacher.eat();
//        teacher.sleep();
//        teacher.teach();

        //工人
        Worker work = new Worker("李雷",28,'男',"电焊工");
        work.eat();
        work.sleep();
        work.introduce();
    }

}
